package org.tigris.mappedlexer.io;

/**
 * An interface representing a sequence of characters.
 * 
 * @author Sam Huang
 */
public interface CharInputSequence {

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public char nextchr();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public String forward(int length);

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public String forwardUntil(char chr);

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void backward(int length);

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public String getName();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public String getLine();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void nextLine();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void close();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public int getColumn();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public int getLineNumber();

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void jumpToColumn(int columnToJump);

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void jumpToLine(int lineToJump);

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void mark() throws Exception;

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	public void reset()throws Exception;
}
